import request from '@/utils/request'

// 查询排污许可证列表
export function listPermit(query) {
  return request({
    url: '/enterprise/permit/list',
    method: 'get',
    params: query
  })
}

// 查询排污许可证详细
export function getPermit(swId) {
  return request({
    url: '/enterprise/permit/' + swId,
    method: 'get'
  })
}

// 新增排污许可证
export function addPermit(data) {
  return request({
    url: '/enterprise/permit',
    method: 'post',
    data: data
  })
}

// 修改排污许可证
export function updatePermit(data) {
  return request({
    url: '/enterprise/permit',
    method: 'put',
    data: data
  })
}

// 删除排污许可证
export function delPermit(swId) {
  return request({
    url: '/enterprise/permit/' + swId,
    method: 'delete'
  })
}

// 导出排污许可证
export function exportPermit(query) {
  return request({
    url: '/enterprise/permit/export',
    method: 'get',
    params: query
  })
}